#ifndef _GAME_LOGGER_H
#define _GAME_LOGGER_H

#include "Singleton.h"
#include "spdlog/spdlog.h"
#include <unordered_map>

class CGameLogger
{
public:
    CGameLogger();
    ~CGameLogger();

public:
    void startup();
    void shutdown();

public:
    void set_level(spdlog::level::level_enum level);
    void debug(const char* tag, const char* where, const char* msg);
    void info(const char* tag, const char* where, const char* msg);
    void warn(const char* tag, const char* where, const char* msg);
    void error(const char* tag, const char* where, const char* msg);
    void critical(const char* tag, const char* where, const char* msg);
    bool trace_enable(const char* tag, bool flag);

private:
    std::unordered_map<std::string, bool> m_ignore_map;
};

typedef Container::singleton_default<CGameLogger> GameLogger;

#endif // !_GAME_LOGGER_H
